
<?php  echo $this->doctype(); ?>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body style="background-image:url(../../../public/images/home_bg.jpg); background-repeat:no-repeat;background-position:center top; background-attachment:fixed; background-color: #D1CDC4">

<div class="wrapper">
	<div class="header">	
            <div class="banner"><span id="banner">REALM DOMINATION</span></div>
            <div class="right-header">
                <div class="exit"> <?php 
											if(isset($this->username))
                                            	echo '<a href="'.$this->url(array('controller' => 'authentication', 'action'=>'logout'), null, true). '"> Log out </a>'; 
											else
												echo '<a class="login" href="'.$this->url(array('controller' => 'authentication', 'action'=>'login'), null, true). '">Login</a>';
											
                                   ?> 
                                   
                </div> 
                <?php /*?><div class="header-user"><?php 

                                            if(isset($this->username))

                                            {

                                                echo 'Welcome '.'<a href="'.$this->url(array('controller' => 'user', 'action'=>'settings'), null, true).'">'.$this->username.'</a>'; 

                                            }

                                       ?>

               </div> <?php */?>
                <div class="server-time"><p><?php echo $this->date; ?></p></div> 
            </div>
		<div class="clear"></div>
	</div><!--//header-->
    <div id="nav-menu">
		<?php if(isset($this->username)) echo $this->navigation(); ?>
    </div><!--//nav-menu-->
    
    
    <?php 
		if(!isset($this->username))
		{
			echo'<div class = "first-page">';
			
				echo'<div class="register">';
					echo'<span>WHAT IS IN YOUR SOUL? LIGHT OR DARK?</span>';
					echo'<a href="'.$this->url(array('controller' => 'authentication', 'action'=>'register'), null, true).'">REGISTER NOW!</a>';
				echo '</div>';
				
				echo'<div class="statistics">';
					echo'<div class="top-clans">TOP 15 clans</div>';
					echo'<div class="top-players">TOP 15 player</div>';
					echo'<div class="races-stats">Race statistics</div>';
				echo'</div>';
				
			echo '</div>';
		}
		else
		{
			echo '<div class="content">';
		
				echo '<div class="main-content">';
				echo $this->layout()->content; 
				echo '</div>';
				
				echo '<div class="clear"></div>';		
		
				echo '<div class="right-content">'; 
				echo '<div class="stats-title"><span>'.'<a href="#">'.$this->playerStats['alias'].'</a></span></div>';
				echo '<span>' . 'Race: '.$this->playerStats['race_name'] . '</span>';
				echo '<span>' . 'Class: '.$this->playerStats['class_name'] . '</span>';
				echo '<span>' . 'Level: '.$this->playerStats['hero_level'] . '</span>';
				echo '<span>' . 'Power: '.round($this->playerStats['power']) . '</span>';
				echo '<span>' . 'Attack points: '.$this->playerStats['attack_points'] . '</span>'; 
				echo '<span>' . 'Wealth: '.$this->playerStats['wealth'] . '</span>';
				echo '<span>' . 'Income: '.round($this->playerStats['income']) . '</span>';  
				echo '<span>' . 'Turns played: '.$this->playerStats['turns_played'] . '</span>';
				echo '<span>' . 'Population: '.$this->playerStats['current_population']. '/'.$this->playerStats['total_population'] . '</span>';
				echo '</div>';
	
			
			echo '</div>';
			
		}
	?>
   
	<div class="footer">
		<ul class="footer-menu">
           <li class="footer-menu-item footer-menu-game">
       	   		<span>The Game</span>
                <ul>
                   <li><a href="#">History</a></li>
                   <li><a href="#">Legend</a></li>
                   <li><a href="#">Gameplay</a></li>
                   <li><a href="#">About</a></li>
                </ul>

           </li>
          <li class="footer-menu-item-race footer-menu-races">
                <span>Classes</span>
                <ul>
                   <li class="race-title">
                   	<span>Light</span>
                    <ul>
                        <li><a href="#">Human</a></li>
                        <li><a href="#">Dwarf</a></li>
                        <li><a href="#">Elf</a></li>
                    </ul>
                    
                   </li>
                   <li class="race-title">
                    <span>Dark</span>
                    <ul>
                        <li><a href="#">Undead</a></li>
                        <li><a href="#">Orc</a></li>
                        <li><a href="#">Troll</a></li>
                    </ul>
                   </li>      	
                </ul>
           </li>
           <li class="footer-menu-item footer-menu-account">
       	   		<span>Account</span>
                <ul>	
				   <?php 
						if(isset($this->username))
                        {
							echo '<li><a href="'.$this->url(array('controller' => 'user', 'action'=>'settings'), null, true).'">Account Settings</a></li>';
						}
                        else
                        {
							echo '<li><a href="'.$this->url(array('controller' => 'authentication', 'action'=>'register'), null, true).'">Create Account</a></li>';
							/*<a href="<?php echo $this->url(array('controller' => 'authentication', 'action'=>'recover'),null, true) ?> "> */
							echo '<li><a href="#">Forgot Password</a></li>';
						}                   

					?>
                </ul>
           </li>
           <li class="footer-menu-item footer-menu-community">
       	   		<span>Community</span>
                <ul>
                   <li><a href="#">Forum</a></li>
                   <li><a href="#">Clans</a></li>
                   <li><a href="#">Players</a></li>
                   <li><a href="#">Hall of Fame</a></li>
                   <li><a href="#">FAQ</a></li>
                </ul>
           </li>

           <li class="footer-menu-item footer-menu-support">
       	   		<span>Support</span>
                <ul>
                   <li><a href="#">Contact Us</a></li>
                   <li><a href="#">EULA</a></li>
                   <li><a href="#">Elves</a></li>
                   <li><a href="#">Privacy Policy</a></li>
                   <li><a href="#">Terms of Service</a></li>
                </ul>
           </li>
			<?php /*?><a href="<?php echo $this->url(array('controller' => 'index', 'action'=>'index'),null, true) ?> ">Homepage</a> <?php */?>
		</ul>
		<div class="footer-copy">(c) 2011 - ver. 0.1.0</div>
	</div>
</div>
</body>
</html>







